import request from '@/utils/request'
// 添加套餐
export const addSetmeal = (addFrom) => {
  return request.post('/admin/setmeal/add', addFrom)
}

// 分页查询数据
export const setmealpage = (page, pageSize, name, categoryId, status) => {
  return request.get('/admin/setmeal/page', {
    params: {
      page: page,
      pageSize: pageSize,
      name: name,
      categoryId: categoryId,
      status: status
    }
  })
}

// 删除所有套餐
export const deleteAll = (ids) => {
  return request.delete('/admin/setmeal', {
    params: {
      ids: ids
    }
  })
}

// 启售禁售套餐菜品
export const setmealstatus = (status, id) => {
  return request.post(`/admin/setmeal/status/${status}`, id)
}

// 根据id回显套餐菜品
export const getsetmeal = (id) => {
  return request.get(`/admin/setmeal/query/${id}`)
}

//  修改套餐菜品

export const updatasetmeal = (editFrom) => {
  return request.put('/admin/setmeal/update', editFrom)
}
